#ifndef _UTILS_SCREEN_MANAGER_H_
# define _UTILS_SCREEN_MANAGER_H_

# include "config.h"
# include <vector>
# include <SDL/SDL.h>
# include "Utils\\AManager.h"
# include "Utils\\IScreen.h"

NS_BEGIN(SDL)
	NS_BEGIN(UTILS)

	struct ScreenArgs : public IArgs
	{
	public:
		SDL_Surface* Screen;
		SDL_Event* Event;
		bool Hide;
		bool Pause;

	public:
		ScreenArgs(SDL_Surface* _surface, SDL_Event* _event) : IArgs(),
			Screen(_surface), Event(_event), Hide(false), Pause(false)
		{
		}

		virtual ~ScreenArgs() {}
	};

	class ScreenManager : public AManager<IScreen>
	{
	private:
		std::vector<std::string> m_screenOrder;

	public:
		ScreenManager();
	private:
		ScreenManager(ScreenManager const&);
	public:
		virtual ~ScreenManager();

	private:
		ScreenManager& operator=(ScreenManager const&);

	public:
		virtual void Add(std::string const& _name, IScreen* _element,
						 MngrFunc _func = NULL, IArgs* _datas = NULL,
						 bool _delete = true);
		virtual void Remove(std::string const& _name);
		virtual void Clear();
		virtual void Manage(IArgs* _args = NULL);
		virtual void Exec(IArgs* _args = NULL);
		virtual void Draw(IArgs* _args = NULL);
	};

	NS_END(UTILS)
NS_END(SDL)

#endif // _UTILS_SCREEN_MANAGER_H_
